using System;
using System.Collections.Generic;
using System.Text;
namespace calculatorapp 
{ 
    public class Class1 
    { 
        public static void KiemTra(bool btnKiemTra, ref string strHienThi) 
        { 
            if (btnKiemTra == true)
            { 
                strHienThi = "";
                btnKiemTra = false; 
            } 
        } 
        public static int Cong(int x, int y)
        { 
            return x + y; 
        } 
        public static string KetQua(double x, double y, int PhepTinh)
        { 
            switch (PhepTinh) 
            { case 1: 
                { return Convert.ToString(x + y);
                } 
                case 2:
                { 
                    return Convert.ToString(x - y);
                } 
                case 3: 
                { 
                    return Convert.ToString(x * y); 
                } 
                case 4: 
                { 
                    if (y == 0) 
                    { 
                        return "Khong the chia cho 0";
                    } 
                    else 
                    { 
                        return Convert.ToString(x / y); 
                    } 
                } 
            } 
            return ""; 
        } 
    }
}